Making Our Own Luck
نویسندگان
چکیده
QuickCheck-style property-based random testing [4] requires efficient generators for well-distributed random data satisfying complex logical predicates. Writing such generators by hand can be difficult and error prone. We propose a domain-specific language, Luck, in which generators are expressed by decorating predicates with lightweight annotations controlling both the distribution of generated values and the amount of constraint solving that happens before each variable is instantiated. Generators in Luck are compact, readable, and maintainable, with efficiency close to custom handwritten generators. We give a precise semantics for Luck, reminiscent of those for probabilistic languages [7], and prove key theorems about its behavior, including the soundness and completeness of random generation with respect to a straightforward predicate semantics.
منابع مشابه
Important Lessons Learned From Nearly a Half-Century of Orthopedic Practice
“Those who cannot remember the past are condemned to repeat it” [1]. The famous quote from Hispanic American philosopher George Santayana reminds us of the critical importance of constantly reflecting on the most important lessons garnered from both our own personal experiences and those of our peers. In 49 years of academic orthopedic practice, I have frequently reflected on the most important...
متن کاملA VoiceXML Enabled Locus of Control Scale System Designed to Engage School Pupils Lacking Commitment in the career development and decision- making process
Careers advisors encourage pupils to become more involved in the process and engage in their own career planning. Many pupils express an expectation of receiving direct career guidance where they are ‘told’ what to do. Such pupils who place their futures in the hands of luck or fate typically lack personal involvement or commitment to the process. This paper outlines the development of a voice-...
متن کاملThe Role of Mechanism in Expectations About the Future: Luck and Skill
Two experiments on decision making explored the role of the mechanism perceived to be generating events. In Experiment 1 participants were told about two identical basketball players who varied in terms of motivation in separate games. Both experienced the same streaks of shot success or failure, and participants predicted the motivated player was more likely to continue the streak in either di...
متن کاملUntangling Skill and Luck How to Think About Outcomes—Past, Present, and Future
• The outcomes for most activities combine skill and luck. • Separating skill and luck encourages better thinking about outcomes and allows for sharply improved decision making. • There are good methods to sort skill and luck in sports, business, and investing. • We define the key features of skill in the investment business.
متن کاملDo CEOs Set Their Own Pay? The Ones Without Principals Do
We empirically examine two competing views of CEO pay. In the contracting view, pay is used to solve an agency problem: the compensation committee optimally chooses pay contracts which give the CEO incentives to maximize shareholder wealth. In the skimming view, pay is the result of an agency problem: CEOs have managed to capture the pay process so that they set their own pay, constrained somew...
متن کامل